package com.ruoyi.student.api.factory;


import com.ruoyi.student.api.StudentFeignClient;
import cn.jlx.it.dto.Trackdto;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class StudentFallback implements FallbackFactory<StudentFeignClient> {
    @Override
    public StudentFeignClient create(Throwable cause) {
        return new StudentFeignClient() {
            @Override
            public AjaxResult add(Trackdto trackdto) {
                return AjaxResult.error("添加失败");
            }
        };
    }
}
